package com.cskaoyan.controller;

import com.cskaoyan.bo.wxcart.CartAddBo;
import com.cskaoyan.service.wxcart.CartService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;

// @RestController
public class WxCartControllerTemp {

    @Autowired
    CartService cartService;


    // @RequestMapping("wx/cart/add")
    public BaseRespVo cartAdd(@RequestBody CartAddBo cartAddBo) {
        int code = cartService.add(cartAddBo);
        if (-1 == code){
            // TODO：库存不足
        }
        return BaseRespVo.ok();
    }

}
